package com.mybatis;

import com.mybatis.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test01 {

    public static void main(String[] args) {

        //加载spring配置文件
        ApplicationContext ac =
                new ClassPathXmlApplicationContext("spring-mybatis.xml");

        UserServiceI usi = (UserServiceI)ac.getBean("userServiceI");
        User user = new User();
        user.setLoginName("hqj123");
       // List<User> list = usi.findUser02();

        List<User> list = usi.likeUser("名");
        for(User u:list){
            System.out.println(u);
        }

    }
}
